package com.goldplusgold.tradedelay.app.base.widget;

import android.content.Context;
import android.view.LayoutInflater;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.goldplusgold.tradedelay.app.R;


public class ViewFactory {
    /**
     * 获取ImageView视图的同时加载显示url
     *
     * @param url
     * @return
     */
    public static ImageView getImageView(Context context, String url) {
        ImageView imageView = (ImageView) LayoutInflater.from(context).inflate(R.layout.view_banner, null);
        Glide.with(context).load(url).into(imageView);
        return imageView;
    }
}
